package com.ai.mapper.made;

import com.ai.entity.exam.ExamRecordPO;
import com.ai.entity.exam.ExamRecordPage;
import com.ai.entity.exam.ExamRecordVO;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @Author：xiaosheng
 * @Date：2024-07-02 15:45
 */
@Mapper
public interface ExamRecordMapper extends BaseMapper<ExamRecordPO> {



    @Select("select er.id          id,\n" +
            "       er.create_time createTime,\n" +
            "       er.update_time updateTime,\n" +
            "       er.create_user createUser,\n" +
            "       er.update_user updateUser,\n" +
            "       er.mark        mark,\n" +
            "       er.exam_result examResult,\n" +
            "       su.account     account,\n" +
            "       su.user_name   userName,\n" +
            "       su.department  department\n" +
            "from exam_record er\n" +
            "         left join sys_user su on er.user_id = su.id \n" +
            "${ew.customSqlSegment}")
    IPage<ExamRecordVO> selectByPage(ExamRecordPage examRecordPage, @Param("ew") QueryWrapper<ExamRecordPO> queryWrapper);
}
